﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.IO;
using System.Text;
using System.Configuration;
namespace Web.AppCode
{
    public class Sys_Common 
    {

        public static string GetSys_CorpType(string key)
        {
            switch (key)
            {
                case "1":
                    return "餐饮美食";
                case "2":
                    return "夜场酒吧";
                case "3":
                    return "娱乐休闲";
                case "4":
                    return "旅游度假";
                case "5":
                    return "时尚购物";
                default:
                    return "未知类别";
            }
        }


        public static string GetSys_CorpTypeIcon(string key)
        {
            switch (key)
            {
                case "1":
                    return "/images/tu1.jpg";//餐饮美食
                case "2":
                    return "/images/tu2.jpg";//夜场酒吧";
                case "3":
                    return "娱乐休闲";
                case "4":
                    return "旅游度假";
                case "5":
                    return "时尚购物";
                default:
                    return "未知类别";
            }
        }



        /// <summary>
        ///panbbb CreatePath
        /// </summary>
        /// <param name="_path">Relateive Path</param>
        /// <returns>return Created state true or false</returns>
        public static bool CreatePath(string _path)
        {
            bool yesOrno = true;
            try
            {
                string jia = HttpContext.Current.Server.MapPath(string.Format("{0}", _path));
                if (!Directory.Exists(jia))
                {
                    Directory.CreateDirectory(jia);
                    //   DirectoryInfo di = Directory.CreateDirectory(jia);
                }
            }
            catch (Exception ex)
            {
                throw ex;
                yesOrno = false;
            }
            return yesOrno;

        }

    }
}
